<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
|
*/

Route::pattern('id', '[0-9]+');

Blade::setContentTags('<%', '%>'); 		// for variables and all things Blade
Blade::setEscapedContentTags('<%%', '%%>'); 	// for escaped data


Route::group(array('prefix' => 'account'), function() {
    Route::get('login', 'AuthController@getLogin');
    Route::post('login', 'AuthController@postLogin');
    Route::get('logout', 'AuthController@getLogout');
    Route::get('activate/{code}', array('as' => 'account.activate', 'uses' => 'AuthController@getActivate'));
});

Route::get('/', array('before' => 'auth', function()
{
    return View::make('index');
}));

Route::group(array('before' => 'csrf', 'prefix'=>'api/v1'), function() {
//    Route::resource('reports', 'ReportController');
//    Route::get('projects/count', 'ProjectController@count');
//    Route::post('projects/uploadfile', 'ProjectController@postDocument');
//    Route::resource('projects', 'ProjectController');
//    Route::resource('weather', 'WeatherController');
    Route::resource('home', 'HomeController');
    Route::resource('users', 'UsersController');
    Route::resource('reports', 'ReportController');
    Route::resource('projects', 'ProjectsController');
    Route::get('signs', 'UsersController@signs');
    Route::post('report-comment', 'ReportController@postComment');
    Route::get('current_user', 'UsersController@current_user');
    //Route::resource('feeds', 'FeedsController');
});

Route::controller('password', 'RemindersController');

